//
//  CLARViewController.m
//  Charles
//
//  Created by Leo on 2019/8/13.
//  Copyright © 2019 charles. All rights reserved.
//

#import "CLARViewController.h"
#import "ARKitView.h"
#import "ARKitManager.h"

@interface CLARViewController ()

@property (nonatomic, strong) ARKitView *arkitView;

@end

@implementation CLARViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.arkitView];
    [[ARKitManager sharedInstance]startTrackingWithARView:self.arkitView trackingType:ARTrackingConfigurationTypePlaneDetection];
}

- (ARKitView *)arkitView {
    if (!_arkitView) {
        _arkitView = [[ARKitView alloc]initWithFrame:self.view.bounds];
    }
    return _arkitView;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
